package com.example.video_module.video;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bw.ijk.widget.IjkView;
import com.example.baserecyclerview.quick.BaseQuickAdapter;
import com.example.baserecyclerview.quick.BaseViewHolder;
import com.example.imgload_sdk.glide.ImgLoad;
import com.example.video_module.R;
import com.example.video_module.video.entity.BeanEntity;

public class InvitationAdapter extends BaseQuickAdapter<BeanEntity, BaseViewHolder> {


    public InvitationAdapter() {
        super(R.layout.item_video);
    }

    @Override
    public void convert(BaseViewHolder holder, BeanEntity item) {
            //文本
            if (item.itemType==0){
                holder.setText(R.id.item_video_artist,item.author.name);
                holder.setText(R.id.item_video_feeds_content,item.feeds_text);
                holder.setText(R.id.item_video_type,item.activityText);
                holder.setText(R.id.item_video_comment_artist,item.author.name);
                holder.setText(R.id.item_video_count,""+item.ugc.likeCount);

                holder.setText(R.id.item_video_comment_count,""+item.ugc.commentCount);
                holder.setText(R.id.item_video_share_count,""+item.ugc.shareCount);

                holder.setImageyun(R.id.item_video_pic,item.author.avatar);
                holder.setImageyun(R.id.item_video_artist_img,item.author.avatar);
                holder.setImage(R.id.item_video_bigimg,item.cover);
            }
            //图片
            if (item.itemType==1){
                holder.setText(R.id.item_video_artist,item.author.name);
                holder.setText(R.id.item_video_feeds_content,item.feeds_text);
                holder.setText(R.id.item_video_type,item.activityText);
                holder.setText(R.id.item_video_comment_artist,item.author.name);
                holder.setText(R.id.item_video_count,""+item.ugc.likeCount);

                holder.setText(R.id.item_video_comment_count,""+item.ugc.commentCount);
                holder.setText(R.id.item_video_share_count,""+item.ugc.shareCount);

                holder.setImageyun(R.id.item_video_pic,item.author.avatar);
                holder.setImage(R.id.item_video_bigimg,item.cover);
                holder.setImageyun(R.id.item_video_artist_img,item.author.avatar);
            }
            //视频
            if (item.itemType==2) {
                holder.setText(R.id.item_video_artist, item.author.name);
                holder.setText(R.id.item_video_feeds_content, item.feeds_text);
                holder.setText(R.id.item_video_type, item.activityText);
                holder.setText(R.id.item_video_comment_artist, item.author.name);
                holder.setText(R.id.item_video_count, "" + item.ugc.likeCount);
                holder.setText(R.id.item_video_comment_content,item.topComment.commentText);

                holder.setText(R.id.item_video_comment_count,""+item.ugc.commentCount);
                holder.setText(R.id.item_video_share_count,""+item.ugc.shareCount);

                holder.setImageyun(R.id.item_video_pic,item.author.avatar);
                holder.setImage(R.id.item_video_bigimg,item.cover);
                holder.setImageyun(R.id.item_video_artist_img,item.author.avatar);
            }
    }
}
